<template>
<div style="width: 1600px;margin: auto">
  <h1>test</h1>
    <div>
      <span v-text="email.substr(email.indexOf('@'))"></span>
    </div>
  <button @click="test">test</button>
</div>
</template>

<script>
export default {
  name: "TestView",
  data() {
    return {
      email:'1260330850@qq.com'
    }
  },
  methods:{
    test(){
      alert(this.email.indexOf('@'))

    }
  }
}
</script>

<style scoped>

</style>